Memory cards, still referred to as smart cards, are being used increasingly as a support for data associated with cardholders. Among these cards, contactless cards, which exchange information by remote electromagnetic coupling between an antenna lodged in the card and an associated reader, were developed as a means of access into controlled access zones, a means of personal identification or even electronic wallets.
The memory containing the data in a smart card is generally a nonvolatile, erasable and re-writable memory, preferably of EEPROM type. This type of memory is divided into a plurality of locations containing data records of a determined length, 32 bytes for example.
During a transaction, several records contained in the card's memory must generally be modified in order to be adapted to the new conditions resulting from the transaction. Unfortunately, the memory, particularly if it is of EEPROM type, requires a relatively long erase/write time (5 ms, for example), during which a power failure may result in the loss of the data contained in the record.
In addition, the various transaction operations, during which several data records are modified, operate in on/off mode. For transaction security reasons, all transactions must be repeated if a power outage occurs during the operation, at the risk of permanently losing sensitive data (for example, the credit balance of an electronic wallet) if it is not possible to repeat the transaction from the beginning.
In order to respond to the problem mentioned above, an attempt was made to memorize the data record in a buffer memory before modifying it. When all changes are completed, the old records are erased from the buffer memory.
Unfortunately, this method requires that 4 operations be performed for each record, namely saving into in the buffer zone, erasing the record to be modified, re-writing, and then erasing the old record in the buffer zone. When the transaction includes many operations, 8 operations for example, as may be the case, the transaction can take a long time and be incompatible with the time taken by the cardholder to present the card to the reader. In addition, the major drawback of this method is that the records in the data zone are always located in the same locations and that the buffer zone is located at a fixed place in the memory; this increases the “stress” on the memory and limits the number of transactions which may be carried out insofar as the number of operations is limited to a given value guaranteed by the silicon manufacturer.